---
id: array
title: Array
---

import Array, { toc as arraytoc } from "./generated/_array.mdx"

Utility functions for `Array`.

```jsx live
function() {
  const xs = A.makeWithIndex(5, index => index) // → [0, 1, 2, 3, 4]
  const value = pipe(
    xs,
    A.tailOrEmpty, // → [1, 2, 3, 4]
    A.take(2), // → [1, 2]
    A.map(value => value * 2), // → [2, 4]
  )

  return JSON.stringify(value)
}
```

<Array />

export const toc = arraytoc
